<?php
$sMonths = getMonths();
$oClientgroups = ClientHandler::getClientgroups();
$oClients = ClientHandler::getClients($_REQUEST['iClientgroup']);
?>
<div id="layer_client_change" class="hidden" style="visibility: visible;">
<form action="index.php" method="post" name="form_client_change">
<input type="hidden" name="sAction" value="client-change">
<input type="hidden" name="sView" value="client-list">
<input type="hidden" name="iClientgroup" value="<?php print $_REQUEST['iClientgroup'] ?>">
<input type="hidden" name="iClient" value="<?php print $_REQUEST['iClient'] ?>">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Change client') ?></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Name') ?>:</td>
		<td class="fieldvalue"><input type="text" id="focus_client_change" name="sName" value="<?php print $oClients[$_REQUEST['iClient']]->sName ?>"></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Worknumber') ?>:</td>
		<td class="fieldvalue">
			<input type="text" name="sSerial" value="<?php print $oClients[$_REQUEST['iClient']]->sSerial ?>"><br>
			<input type="checkbox" name="bUpdateWork"> <span class="small"><?php print msg('Update and send in registered times for') ?> <?php print $sMonths[date('n')] ?>.</span>
		</td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Clientlist') ?>:</td>
		<td class="fieldvalue">
			<select name="iNewClientgroup">
<?php
foreach ($oClientgroups as $iID => $oThisGroup) {
	echo '<option value="'.$iID.'" '.($iID == $_REQUEST['iClientgroup'] ? 'selected' : '').'>'.$oThisGroup->sName.'</option>';
}
?>
			</select>
		</td>
	</tr>
	<tr>
		<td class="boxbody center" colspan="2">
			<input type="submit" value="<?php print msg('OK') ?>">
			<input type="button" value="<?php print msg('Cancel') ?>" onClick="layerHide('layer_client_change');">
		</td>
	</tr>
</table>
</form>
</div>
